//Headers for huff.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ERROR -1
#define OK 0

typedef struct huffTree huffTree;
struct huffTree{
    char character;
    int weight;
    char* code;
    huffTree* right;
    huffTree*  left;

};

struct pqueue{
    huffTree* forest;
    huffTree**  nodes;
    int front,rear,size;

};
typedef struct pqueue pqueue;
void printtree(huffTree*);
huffTree* dequeue(pqueue*);
void enqueue(pqueue*,huffTree*);
void buildCode(huffTree*,char*,huffTree**);
huffTree* createTree(pqueue*);
void readFile(huffTree**,char*);
void createHeader(huffTree**,char*,long);
int countArray(huffTree**);
long encode(huffTree**,char*,char*);
void encodeToFile(char*);
